{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "7d6ff5e1-ff7f-42b7-84d6-7d90a5f34c06",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "%goflags=[\"--cover\" \"--covermode=set\"]\n"
     ]
    }
   ],
   "source": [
    "%goflags --cover --covermode=set"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7ede954c-aac6-4191-a727-374eba56473e",
   "metadata": {},
   "outputs": [],
   "source": [
    "func incr[T interface{constraints.Float|constraints.Integer}](x T) T {\n",
    "    return x+T(1)\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e7f9e2a0-dbc3-42e0-b980-f8d6e9955b72",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "incr: x=2, y=4.14\n"
     ]
    }
   ],
   "source": [
    "%%\n",
    "x := incr(1)\n",
    "y := incr(math.Pi)\n",
    "fmt.Printf(\"incr: x=%d, y=%.2f\\n\", x, y)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Go (gonb)",
   "language": "go",
   "name": "gonb"
  },
  "language_info": {
   "codemirror_mode": "",
   "file_extension": ".go",
   "mimetype": "text/x-go",
   "name": "go",
   "nbconvert_exporter": "",
   "pygments_lexer": "",
   "version": "go1.25.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
